#pragma once

#include "Graph.h"

const int WEIGHT_MAX = INT_MAX / 1000000;
inline std::vector<edge> MakeRandomEdges(int vertices_number){
    int edges_number = rand() % (vertices_number * vertices_number + 1);
    std::set<edge> edges;
    for(int current_edge = 0; current_edge < edges_number; current_edge++){
        int from = rand() % vertices_number;
        int to = rand() % vertices_number;
        edge new_edge (from, to, 0);
        edges.insert(new_edge);
    }
    std::vector<edge> result (edges.begin(), edges.end());
    for(int current_edge = 0; current_edge < result.size(); current_edge++){
        result[current_edge].weight = rand() % WEIGHT_MAX;
    }
    return result;
}

inline std::vector<edge> MakeFullGraphEdges(int vertices_number){
    std::vector<edge> result;
    for(int from = 0; from < vertices_number; from++){
        for(int to = 0; to < vertices_number; to++){
            int weight = rand() % WEIGHT_MAX;
            edge new_edge(from, to, weight);
            result.push_back(new_edge);
        }
    }
    return result;
}